import { defineStore } from 'pinia'

interface AppSate {
    config: Record<string, any>
}

export const useAppStore = defineStore({
    id: 'appStore',
    actions: {
        getImageUrl(url: string) {
            const { VITE_APP_BASE_URL } = import.meta.env
            if (url && url.startsWith('http')) {
                return url
            }
            return `${VITE_APP_BASE_URL}/${url}`
        },
    }
})
